import Http from '../../ajax/Http';
const service = 'api/offered';
class OfferedController{
    // 发布新的悬赏任务
    createdProject(params){
        return Http.post(service, 'create-project',params)
    }
    // 任务列表
    getProjectList(params){
        return Http.post(service, 'office-project-list',params)
    }
    // 可领取的任务列表
    getCanApplyList(params){
        return Http.post(service, 'can-apply-list',params)
    }
    // 创新办公室审批提交
    officeAgreementSubmit(params){
        return Http.post(service, 'office-agreement-submit',params)
    }
    // 终止任务
    toStop(projectCode,userName){
        return Http.get(service, `stopped/${projectCode}/${userName}`)
    }
    // 领取任务
    applyOffered(params){
        return Http.post(service, `apply-submit`,params)
    }
    // 上传作品
    resultUpload(params){
        return Http.post(service, `result-upload`,params)
    }
     // 作品评定
     resultReview(params){
        return Http.post(service, `result-agreement`,params)
    }
    // 我申请的项目
    getApplyRecordList(params){
        return Http.post(service, `get-apply-record-list`,params)
    }
    // 获取任务申领数据
    getOfficeRecordStatistic(params){
        return Http.post(service, `get-offered-record-statistic`,params)
    }
    // 获取任务发布数据
    getOfficeStatistic(params){
        return Http.post(service, `get-offered-statistic`,params)
    }
 
    // 获取个人得分
    getScore(userName){
        return Http.get(service, `get-offered-score/${userName}`)
    }
}

export default new OfferedController();